<?php
	/**
	 * 修改专属房信息
	 */
    class EditExclusiveRoom extends APIBase {
		
		public $tag = "EditExclusiveRoom";
		public $isLogin = true;
		
		public function before() {
			$this->initCacheRedis();
			$this->initMysql();
			return true;
		}

		public function logic() {
			$gameConfig = $this->param['gameConfig'];
			$deskName = $this->param['deskName'];
			$playerID = $this->uid;	
			if($gameConfig!="" && $deskName!=""){
				$this->cache_redis->hMset("hExclusiveRoom:".$playerID,array('gameConfig'=>json_encode($gameConfig),'deskName'=>$deskName));
				$this->returnData(0);
			}else{
				$this->returnError(301,'修改失败');
			}
		}
		
    	public function after() {
			$this->deinitCacheRedis();
		}
    }
?>
